package annotation;

/**
 * @author uiao
 * @Title: 注解的使用
 * @date 2018/8/315:46
 */
public class Company {

    @Phone(value = "12345")
    private String phone;

    private String cityName;

    private String cityCode;

    public Company() {
    }

    ;

    public Company(String phone, String cityName, String cityCode) {
        this.phone = phone;
        this.cityName = cityName;
        this.cityCode = cityCode;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    @City(name = "上海", code = "020")
    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    @Override
    public String toString() {
        return "Company{" +
                "phone='" + phone + '\'' +
                ", cityName='" + cityName + '\'' +
                ", cityCode='" + cityCode + '\'' +
                '}';
    }
}
